package com.home.free.controller.home;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * 定一个首页类
 * @author gaotianjie
 */
@Controller
@RequestMapping("/")
public class HomeController {

    @GetMapping("/")
    public String index(Model model) {
        model.addAttribute("name", "世界你好");

        return "home/index";
    }

    public static void main(String[] args) {
        new HomeController().test();
    }

    private void test() {
        System.out.println(super.getClass().getName());
    }
}
